* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #f5f5f5;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}


.card {
    position: relative;
    width: 200px;
    height: 200px;
    border-radius: 5px;
    background: #fff;
    box-shadow: 0 5px 10px rgba(0, 0, 0, .5);
    display: flex;
    justify-content: center;
    align-items: center;
}


.toggle {
    position: relative;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    cursor: pointer;
    overflow: hidden;
}

.toggle span {
    position: absolute;
    width: 100%;
    height: 4px;
    border-radius: 4px;
    background: #3D74E8;
    transition: 0.5s;
}

.toggle span:nth-child(1) {
    top: 10px;
    width: 70%;
}

.toggle span:nth-child(3) {
    bottom: 10px;
    width: 30%;
}

.toggle.active span:nth-child(1) {
    width: 100%;
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
}

.toggle.active span:nth-child(2) {
    transform: translateX(100px);
}

.toggle.active span:nth-child(3) {
    width: 100%;
    top: 50%;
    transform: translateY(-50%) rotate(-45deg);
}
